<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //let 定义一个变量，变量的值可以修改
        let name = "zhangsan";
        console.log(name);
        name = "zhangsan1";
        console.log(name);

        //对于const的理解：就是变量指向不能改变 但是像下面的例子student指向没有改变，只是student一个属性改变了。
        const student = {
            name:"李四",
            age:"23",
            sno:"2022180127"
        }
        console.log(student);
        student.age = "78";
        console.log(student);

        // const PI = 3.14;
        // PI = 87; 
        console.log("=============")
        const arr = [1,2,3,45];
        arr.push(67);
        console.log(arr);
        arr.shift()
        console.log(arr);
        arr.pop();
        console.log(arr);

        let test = `tetsadwiohd`;
        console.log(test);
        console.log(test);

        let h1 = 
        `<div class="hot-goods-box">
            <h1>
                卖爆了，卖爆了
            </h1>
        </div>`;
        console.log(h1);

        const arr2 = [2,[3,4],6];
        let [a,b] = arr2[1];
        console.log('a:' + a +  "\n" + 'b:' + b)

        const obj = {
            data: {
                cod1e: 10000,
                message: '频道列表获取成功',
                result: ['html','css','javascript','vue','springboot']
            },
            status: 200,
            statusText: 'Ok'
        }
        let {cod1e: code,message: message,result: result} = obj.data;
        console.log("#################");
        console.log(code);
        console.log(message);
        console.log(result);

    </script>
    
</body>
</html>